/**
 * 
 * Menu Item class to make objects of each item for menu
 * store objects in MenuList
 *
 */

public class MenuItem implements Comparable<MenuItem>{
	private String dishName;
	private String categoryName;
	private String cuisineName;
	private double price;
	

	/**
	 * @param dishName
	 * @param categoryName
	 * @param cuisineName
	 * @param price
	 */
	public MenuItem(String dishName, String categoryName, String cuisineName, double price) {
		super();
		this.dishName = dishName;
		this.categoryName = categoryName;
		this.cuisineName = cuisineName;
		this.price = price;
	}
	
	/**
	 * @return the dishName
	 */
	public String getDishName() {
		return dishName;
	}
	
	/**
	 * @return the categoryName
	 */
	public String getCategoryName() {
		return categoryName;
	}
	
	/**
	 * @return the cuisineName
	 */
	public String getCuisineName() {
		return cuisineName;
	}
	
	/**
	 * @return the price
	 */
	public double getPrice() {
		return price;
	}


	/**
	 * @param dishName the dishName to set
	 */
	public void setDishName(String dishName) {
		this.dishName = dishName;
	}

	/**
	 * @param categoryName the categoryName to set
	 */
	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}
	
	/**
	 * @param cuisineName the cuisineName to set
	 */
	public void setCuisineName(String cuisineName) {
		this.cuisineName = cuisineName;
	}

	/**
	 * @param price the price to set
	 */
	public void setPrice(double price) {
		this.price = price;
	}

/**
 * compareTo() to override for Comparable interface
 * compares the dish name to be unique
 */
	public int compareTo(MenuItem o) {
		return dishName.compareTo(o.dishName);
	}
	
/**
 * Checks if dish exists in list
 */
	public boolean equals(Object o) {
		if (o instanceof MenuItem) {
			MenuItem other = (MenuItem) o;
			if (dishName.equals(other.dishName)) {
				return true;
			}
		}
		return false;
	}
	

}
